From 138409faaea83d42576d10adcfef0af75026474f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Mon, 18 Apr 2011 00:07:41 +0100 Subject: [PATCH] Move documentation to inline comments: GtkPrintUnixDialog --- docs/reference/gtk/tmpl/.gitignore | 1 + .../gtk/tmpl/gtkprintunixdialog.sgml | 317 ------------------ gtk/gtkprinter.h | 22 ++ gtk/gtkprintunixdialog.c | 71 ++++ 4 files changed, 94 insertions(+), 317 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkprintunixdialog.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index 8bd6d8cea4..35d3e2ae27 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -85,6 +85,7 @@ gtkprinter.sgml gtkprintjob.sgml gtkprintoperation.sgml gtkprintsettings.sgml +gtkprintunixdialog.sgml gtkprogressbar.sgml gtkradioaction.sgml gtkradiobutton.sgml diff --git a/docs/reference/gtk/tmpl/gtkprintunixdialog.sgml b/docs/reference/gtk/tmpl/gtkprintunixdialog.sgml deleted file mode 100644 index d5155ad70b..0000000000 --- a/docs/reference/gtk/tmpl/gtkprintunixdialog.sgml +++ /dev/null @@ -1,317 +0,0 @@ - -GtkPrintUnixDialog - - -A print dialog - - - -GtkPrintUnixDialog implements a print dialog for platforms -which don't provide a native print dialog, like Unix. It can -be used very much like any other GTK+ dialog, at the cost of -the portability offered by the high-level printing API - - -In order to print something with #GtkPrintUnixDialog, you need -to use gtk_print_unix_dialog_get_selected_printer() to obtain -a #GtkPrinter object and use it to construct a #GtkPrintJob using -gtk_print_job_new(). - - -#GtkPrintUnixDialog uses the following response values: - - %GTK_RESPONSE_OK - for the "Print" button - - %GTK_RESPONSE_APPLY - for the "Preview" button - - %GTK_RESPONSE_CANCEL - for the "Cancel" button - - - - - - - -Printing support was added in GTK+ 2.10. - - -GtkPrintUnixDialog as GtkBuildable - -The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its -@notebook internal children with the name "notebook". - - -A <structname>GtkPrintUnixDialog</structname> UI definition fragment. - - - - - - Content on notebook tab - - - - - Tab label - - - False - False - - - - - -]]> - - - - - -#GtkPageSetupUnixDialog, #GtkPrinter, #GtkPrintJob - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@title: -@parent: -@Returns: - - - - - - - -@dialog: -@page_setup: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@current_page: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@settings: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@child: -@tab_label: - - - - - - - -@dialog: -@support_selection: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@has_selection: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@embed: - - - - - - - -@dialog: -@Returns: - - - - - - - -@dialog: -@Returns: - - - - -An enum for specifying which features the print dialog should offer. -If neither %GTK_PRINT_CAPABILITY_GENERATE_PDF nor -%GTK_PRINT_CAPABILITY_GENERATE_PS is specified, GTK+ assumes that all -formats are supported. - - -@GTK_PRINT_CAPABILITY_PAGE_SET: Print dialog will offer printing even/odd pages. -@GTK_PRINT_CAPABILITY_COPIES: Print dialog will allow to print multiple copies. -@GTK_PRINT_CAPABILITY_COLLATE: Print dialog will allow to collate multiple copies. -@GTK_PRINT_CAPABILITY_REVERSE: Print dialog will allow to print pages in reverse order. -@GTK_PRINT_CAPABILITY_SCALE: Print dialog will allow to scale the output. -@GTK_PRINT_CAPABILITY_GENERATE_PDF: The program will send the document to - the printer in PDF format -@GTK_PRINT_CAPABILITY_GENERATE_PS: The program will send the document to - the printer in Postscript format -@GTK_PRINT_CAPABILITY_PREVIEW: Print dialog will offer a preview -@GTK_PRINT_CAPABILITY_NUMBER_UP: Print dialog will offer printing multiple - pages per sheet. Since 2.12 -@GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT: Print dialog will allow to rearrange - pages when printing multiple pages per sheet. Since 2.14 - - - - - - -@dialog: -@capabilities: - - - - - - - -@dialog: -@Returns: - - diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h index f2c18c10c2..a9e8736d1c 100644 --- a/gtk/gtkprinter.h +++ b/gtk/gtkprinter.h @@ -34,6 +34,28 @@ G_BEGIN_DECLS /* Note, this type is manually registered with GObject in gtkprinter.c * If you add any flags, update the registration as well! */ +/** + * GtkPrintCapabilities: + * @GTK_PRINT_CAPABILITY_PAGE_SET: Print dialog will offer printing even/odd pages. + * @GTK_PRINT_CAPABILITY_COPIES: Print dialog will allow to print multiple copies. + * @GTK_PRINT_CAPABILITY_COLLATE: Print dialog will allow to collate multiple copies. + * @GTK_PRINT_CAPABILITY_REVERSE: Print dialog will allow to print pages in reverse order. + * @GTK_PRINT_CAPABILITY_SCALE: Print dialog will allow to scale the output. + * @GTK_PRINT_CAPABILITY_GENERATE_PDF: The program will send the document to + * the printer in PDF format + * @GTK_PRINT_CAPABILITY_GENERATE_PS: The program will send the document to + * the printer in Postscript format + * @GTK_PRINT_CAPABILITY_PREVIEW: Print dialog will offer a preview + * @GTK_PRINT_CAPABILITY_NUMBER_UP: Print dialog will offer printing multiple + * pages per sheet. Since 2.12 + * @GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT: Print dialog will allow to rearrange + * pages when printing multiple pages per sheet. Since 2.14 + * + * An enum for specifying which features the print dialog should offer. + * If neither %GTK_PRINT_CAPABILITY_GENERATE_PDF nor + * %GTK_PRINT_CAPABILITY_GENERATE_PS is specified, GTK+ assumes that all + * formats are supported. + */ typedef enum { GTK_PRINT_CAPABILITY_PAGE_SET = 1 << 0, diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index f4a5049f60..e3515a01d6 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -61,6 +61,77 @@ #include "gtkprivate.h" #include "gtktypebuiltins.h" + +/** + * SECTION:gtkprintunixdialog + * @Short_description: A print dialog + * @Title: GtkPrintUnixDialog + * @See_also: #GtkPageSetupUnixDialog, #GtkPrinter, #GtkPrintJob + * + * GtkPrintUnixDialog implements a print dialog for platforms + * which don't provide a native print dialog, like Unix. It can + * be used very much like any other GTK+ dialog, at the cost of + * the portability offered by the + * high-level printing API + * + * In order to print something with #GtkPrintUnixDialog, you need + * to use gtk_print_unix_dialog_get_selected_printer() to obtain + * a #GtkPrinter object and use it to construct a #GtkPrintJob using + * gtk_print_job_new(). + * + * #GtkPrintUnixDialog uses the following response values: + * + * %GTK_RESPONSE_OK + * for the "Print" button + * + * %GTK_RESPONSE_APPLY + * for the "Preview" button + * + * %GTK_RESPONSE_CANCEL + * for the "Cancel" button + * + * + * + * + * + * Printing support was added in GTK+ 2.10. + * + * + * GtkPrintUnixDialog as GtkBuildable + * + * The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its + * @notebook internal children with the name "notebook". + * + * + * A <structname>GtkPrintUnixDialog</structname> UI definition fragment. + * + * + * + * + * + * Content on notebook tab + * + * + * + * + * Tab label + * + * + * False + * False + * + * + * + * + * + * ]]> + * + * + * + */ + + #define EXAMPLE_PAGE_AREA_SIZE 110 #define RULER_DISTANCE 7.5 #define RULER_RADIUS 2 -- 2.30.2